program l;
{$APPTYPE CONSOLE}

var
  x, y, i, k: Integer;
  a: array[1..100000] of Boolean;
function test(i: integer): Boolean;
begin
  Result := False;
  while i <> 0 do begin
    Result := Result xor Boolean(i mod 2);
    i := i div 2;
  end;
end;

begin
  readln(k);
  for i := 1 to k do begin
    readln(x, y);
    a[i] := test(x xor y);
  end;
  for i := 1 to k do begin
    if a[i] then
      writeln('seven')
    else
      writeln('four')
  end;
end.
